{php include wl_template('common/header');}
<div class="app-content">
	<ul class="nav nav-tabs" id="myTab">
		<li class="active">
			<a href="#">赠礼记录</a>
		</li>
	</ul>
	<div class="app-filter">
		<div class="filter-list">
			<form action="" method="get" class="form-horizontal" role="form" id="form1">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{MODULE_NAME}" />
				<input type="hidden" name="p" value="paidpromotion" />
				<input type="hidden" name="ac" value="payactive" />
				<input type="hidden" name="do" value="recodelist" />
				<div class="form-group">
					<label class="col-sm-2 control-label">订单类型</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">全部</a>
							<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">抢购</a>
							<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">拼团</a>
							<a href="{php echo wl_filter_url('type:3');}" class="btn {if $_GPC['type'] == 3}btn-primary{else}btn-default{/if}">卡券</a>
							<a href="{php echo wl_filter_url('type:4');}" class="btn {if $_GPC['type'] == 4}btn-primary{else}btn-default{/if}">团购</a>
							<a href="{php echo wl_filter_url('type:9');}" class="btn {if $_GPC['type'] == 9}btn-primary{else}btn-default{/if}">砍价</a>
							<a href="{php echo wl_filter_url('type:5');}" class="btn {if $_GPC['type'] == 5}btn-primary{else}btn-default{/if}">一卡通</a>
							<a href="{php echo wl_filter_url('type:8');}" class="btn {if $_GPC['type'] == 8}btn-primary{else}btn-default{/if}">同城配送</a>
							<a href="{php echo wl_filter_url('type:7');}" class="btn {if $_GPC['type'] == 7}btn-primary{else}btn-default{/if}">在线买单</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">时间</label>
					<div class="col-md-2">
	                	{php echo tpl_select_time_info('time_limit',array('starttime' => date('Y-m-d',$starttime),'endtime' => date('Y-m-d',$endtime)));}
	                </div>
				</div>	
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary" id="search">筛选</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		$("#search").click(function(){
			$('#form1')[0].submit();
		});
	</script>
	<div class="app-table-list">
		<div class="panel-body table-responsive collapse in" id="order-template-item-4" style="padding: 0;">
			<table class="table table-hover table-bordered">
				<thead style="background-color: #FFFFFF;">
				<tr>
					<th style="width:80px;">订单内容</th>
					<th style="width:40px;">订单类型</th>
					<th style="width:80px;text-align:center;">买家信息</th>
					<th style="width:80px;text-align:center;">活动名称</th>
					<th style="width:60px; text-align:center;">赠送积分/余额</th>
					<th style="width:60px; text-align:center;">赠品内容</th>
					<th style="width:100px; text-align:center;">时间</th>
				</tr>
				</thead>
				<tbody>
				{loop $lists $item}
				<tr>
					<td class="goods-info line-feed">
						<img style="width:50px;height:50px;border:1px solid #efefef; padding:1px;position:relative;top:-10px;" src="{$item['logo']}" />
						<div class="title" style="padding-left: 10px;display:inline-block;">
							<span>商品:{$item['goodname']}</span><br/>
							<span>金额:￥{$item['price']}</span>
						</div>
					</td>
					<td class="text-center">
					{if $item['type'] == 1}<span class="label label-success">抢购</span>{/if}
					{if $item['type'] == 4}<span class="label label-warning">团购</span>{/if}
					{if $item['type'] == 2}<span class="label label-danger">拼团</span>{/if}
					{if $item['type'] == 3}<span class="label label-info">卡券</span>{/if}
					{if $item['type'] == 9}<span class="label label-danger">砍价</span>{/if}
					{if $item['type'] == 5}<span class="label label-default">一卡通</span>{/if}
					{if $item['type'] == 6}<span class="label label-primary">付费入驻</span>{/if}
					{if $item['type'] == 7}<span class="label label-primary">在线买单</span>{/if}
					{if $item['type'] == 8}<span class="label label-success">同城配送</span>{/if}
					</td>
					<td>
						<div style="position: relative;top: 15px;" class="img"><img style="height: 50px;width: 50px;" class="scrollLoading" src="{IMAGE_PIXEL}" data-url="{php echo tomedia($item['headimg'])}"></div>
						<div class="title" style="padding-left: 60px;position: relative;top: -25px;">
							<span>{$item['nickname']}</span><br/>
							<span>{$item['mobile']}</span>
						</div>
					</td>
					<td class="text-center" style="position: relative;">
						{$item['activename']}
					</td>
					<td class="text-center" style="position: relative;">
						{$item['integral']}积分<br/>
						{$item['balance']}余额
					</td>
					<td class="text-center" style="position: relative;">
						{if $item['couponid']}
						{loop $item['couponname'] $cname}
						<p>卡券:{$cname}</p>
						{/loop}
						{if $item['getcouflag']}<p>领取时间:{php echo date('Y-m-d H:i',$item['getcoutime'])}</p>{else}<span class="label label-default">未领取</span>{/if}
						{/if}
						{if $item['codeid']}
						<p>激活码:{$item['code']}</p>
						{/if}
						{if $item['redpackid']}
						{loop $item['redpackname'] $rname}
						<p>红包:{$rname}</p>
						{/loop}
						{/if}
						{if empty($item['couponid']) && empty($item['redpackid']) && empty($item['codeid'])}
							无赠品
						{/if}
					</td>
					<td class="text-center" style="position: relative;">
						{php echo date('Y-m-d H:i',$item['createtime'])}
					</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$("#search").click(function(){
		$('#form1')[0].submit();
	});
</script>
{php include wl_template('common/footer');}